﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.Collections.Generic;
using MvcCms.Data;
using AutoMapper;
using System;

namespace MvcCms.Store.Web.ViewModels
{
    public class PriceOptionViewModel 
    {
        [ScaffoldColumn(false)]
        public int PriceOptionID { get; set; }

        [ScaffoldColumn(false)]
        public int PortalID { get; set; }

        [Required(ErrorMessage = "Price Option Title is required")]
        [StringLength(160)]
        public string Title { get; set; }

        [Required(ErrorMessage = "Price is required")]
        [Range(0.01, 100.00,
            ErrorMessage = "Price must be between 0.01 and 100.00")]
        public decimal Price { get; set; }

        [StringLength(500)]
        public string Description { get; set; }

        [DisplayName("Requires Notes")]
        public bool RequiresNotes { get; set; }

        [DisplayName("Notes Instructions")]
        [StringLength(500)]
        public string NotesInstructions { get; set; }

        public virtual IEnumerable<StoreProduct> Products { get; set; }
        public virtual Portal Portal { get; set; }
    }
}